import request from "@/utils/request"

//用户管理
//查询用户
export function search_yonghu(payload = {}) {
    return request.get("/yanyonghu", { params: payload })
}

// 新增用户
export function add_yonghu(payload = {}) {
    return request.post("/yanyonghu", payload)
}

//删除用户
export function del_yonghu(payload = {}) {
    return request.delete("/yanyonghu/" + payload, payload)
}

//修改用户状态
export function change_zhuangtai(payload:any = {}) {
    return request.patch("/yanyonghu/" + payload.id, payload)
}


//角色管理-------------------------------------------------------------------------
//查询角色
export function search_jiaose(payload = {}) {
    return request.get("/yanjiaose", { params: payload })
}

//新增角色
export function add_jiaose(payload = {}) {
    return request.post("/yanjiaose", payload)
}

//删除角色
export function del_jiaose(payload = {}) {
    return request.delete("/yanjiaose/"+payload, payload)
}

//修改角色状态
export function change_JSzhuangtai(payload:any = {}) {
    return request.patch("/yanjiaose/" + payload.id, payload)
}